package com.zhuojy.equity.mall.admin.web.config;

import org.quartz.Scheduler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;

/**
 * @description: 定时任务配置
 * @author chen
 * @date 2024/4/15 19:23
 * @version 1.0
 */
@Configuration
public class ScheduleConfig {
    @Autowired
    private SchedulerFactoryBean schedulerFactoryBean;

    @Bean(name = "scheduler")
    public Scheduler scheduler() {
        return schedulerFactoryBean.getScheduler();
    }
}
